package com.patterns.mediator;

import java.util.HashMap;
import java.util.Map;

/**
 * 总经理，中介者，负责协调各部门外部工作
 * @author huangke
 *
 */
public class PresidentMediator implements Mediator{
	
	private Map<String,Department> map = new HashMap<String,Department>();

	public void register(String departmentName, Department d) {
		map.put(departmentName, d);
	}

	public void command(String departmentName) {
		this.map.get(departmentName).selfAction();
	}

}
